<?php
	
	class xl_hinh_anh_dia_diem extends database
	{
		/***************************khánh*******************************/
		function hinhAnhDiaDiem($madiadiem){
			$this->setQuerry("select * from hinhanhdiadiem where madiadiem = ".$madiadiem."");
			$result = $this->loadAllRow();
			return $result;
		}
		/**************************[end] khánh--------------------------*/
		function danhSachHinhAnh()
		{
			$this->setQuerry('select * from hinhanhdiadiem');
			$result = $this->loadAllRow();
			return $result;
		}
		function themHinhAnh($duongdan,$madiadiem)
		{
			$this->setQuerry("insert into hinhanhdiadiem (DuongDan,MaDiaDiem) values('$duongdan','$madiadiem')");
			$result=$this->querry();
			return $result;
		}
		function capNhatHinhAnh($mahinhanh,$duongdan,$madiadiem)
		{
			$this->setQuerry("update hinhanhdiadiem set DuongDan='$duongdan', MaDiaDiem=$madiadiem where MaHinhAnh=$mahinhanh");
			$result=$this->querry();
			return $result;
		}
		function xoaHinhAnh($mahinhanh)
		{
			$this->setQuerry("delete from hinhanhdiadiem where MaHinhAnh=$mahinhanh");
			$result=$this->querry();
			return $result;
		}
	}
?>